3.409 \(\int \frac{\sinh ^2(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx\)

Optimal. Leaf size=89 \[ -\frac{a^3 \log (a+b \sinh (c+d x))}{b^2 d \left (a^2+b^2\right )}-\frac{b \tan ^{-1}(\sinh (c+d x))}{d \left (a^2+b^2\right )}-\frac{a \log (\cosh (c+d x))}{d \left (a^2+b^2\right )}+\frac{\sinh (c+d x)}{b d} \]

[Out]

-((b*ArcTan[Sinh[c + d*x]])/((a^2 + b^2)*d)) - (a*Log[Cosh[c + d*x]])/((a^2 + b^2)*d) - (a^3*Log[a + b*Sinh[c
+ d*x]])/(b^2*(a^2 + b^2)*d) + Sinh[c + d*x]/(b*d)

________________________________________________________________________________________

Rubi [A]  time = 0.195858, antiderivative size = 89, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2837, 12, 1629, 635, 203, 260} \[ -\frac{a^3 \log (a+b \sinh (c+d x))}{b^2 d \left (a^2+b^2\right )}-\frac{b \tan ^{-1}(\sinh (c+d x))}{d \left (a^2+b^2\right )}-\frac{a \log (\cosh (c+d x))}{d \left (a^2+b^2\right )}+\frac{\sinh (c+d x)}{b d} \]

Antiderivative was successfully verified.

[In]

Int[(Sinh[c + d*x]^2*Tanh[c + d*x])/(a + b*Sinh[c + d*x]),x]

[Out]

-((b*ArcTan[Sinh[c + d*x]])/((a^2 + b^2)*d)) - (a*Log[Cosh[c + d*x]])/((a^2 + b^2)*d) - (a^3*Log[a + b*Sinh[c
+ d*x]])/(b^2*(a^2 + b^2)*d) + Sinh[c + d*x]/(b*d)

Rule 2837

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n*(b^2 - x^2)^((p - 1)/2), x], x
, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1629

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*
Pq*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{\sinh ^2(c+d x) \tanh (c+d x)}{a+b \sinh (c+d x)} \, dx &=-\frac{b \operatorname{Subst}\left (\int \frac{x^3}{b^3 (a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{x^3}{(a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (c+d x)\right )}{b^2 d}\\ &=-\frac{\operatorname{Subst}\left (\int \left (-1+\frac{a^3}{\left (a^2+b^2\right ) (a+x)}+\frac{b^4+a b^2 x}{\left (a^2+b^2\right ) \left (b^2+x^2\right )}\right ) \, dx,x,b \sinh (c+d x)\right )}{b^2 d}\\ &=-\frac{a^3 \log (a+b \sinh (c+d x))}{b^2 \left (a^2+b^2\right ) d}+\frac{\sinh (c+d x)}{b d}-\frac{\operatorname{Subst}\left (\int \frac{b^4+a b^2 x}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{b^2 \left (a^2+b^2\right ) d}\\ &=-\frac{a^3 \log (a+b \sinh (c+d x))}{b^2 \left (a^2+b^2\right ) d}+\frac{\sinh (c+d x)}{b d}-\frac{a \operatorname{Subst}\left (\int \frac{x}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{\left (a^2+b^2\right ) d}-\frac{b^2 \operatorname{Subst}\left (\int \frac{1}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{\left (a^2+b^2\right ) d}\\ &=-\frac{b \tan ^{-1}(\sinh (c+d x))}{\left (a^2+b^2\right ) d}-\frac{a \log (\cosh (c+d x))}{\left (a^2+b^2\right ) d}-\frac{a^3 \log (a+b \sinh (c+d x))}{b^2 \left (a^2+b^2\right ) d}+\frac{\sinh (c+d x)}{b d}\\ \end{align*}

Mathematica [C]  time = 0.175769, size = 91, normalized size = 1.02 \[ -\frac{\frac{2 a^3 \log (a+b \sinh (c+d x))}{b^2 \left (a^2+b^2\right )}+\frac{\log (-\sinh (c+d x)+i)}{a+i b}+\frac{\log (\sinh (c+d x)+i)}{a-i b}-\frac{2 \sinh (c+d x)}{b}}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sinh[c + d*x]^2*Tanh[c + d*x])/(a + b*Sinh[c + d*x]),x]

[Out]

-(Log[I - Sinh[c + d*x]]/(a + I*b) + Log[I + Sinh[c + d*x]]/(a - I*b) + (2*a^3*Log[a + b*Sinh[c + d*x]])/(b^2*
(a^2 + b^2)) - (2*Sinh[c + d*x])/b)/(2*d)

________________________________________________________________________________________

Maple [B]  time = 0.06, size = 196, normalized size = 2.2 \begin{align*} -{\frac{1}{bd} \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) ^{-1}}+{\frac{a}{{b}^{2}d}\ln \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) }-{\frac{1}{bd} \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) ^{-1}}+{\frac{a}{{b}^{2}d}\ln \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) }-{\frac{{a}^{3}}{{b}^{2}d \left ({a}^{2}+{b}^{2} \right ) }\ln \left ( \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}a-2\,\tanh \left ( 1/2\,dx+c/2 \right ) b-a \right ) }-8\,{\frac{a\ln \left ( \left ( \tanh \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) }{d \left ( 8\,{a}^{2}+8\,{b}^{2} \right ) }}-16\,{\frac{b\arctan \left ( \tanh \left ( 1/2\,dx+c/2 \right ) \right ) }{d \left ( 8\,{a}^{2}+8\,{b}^{2} \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(d*x+c)^2*tanh(d*x+c)/(a+b*sinh(d*x+c)),x)

[Out]

-1/d/b/(tanh(1/2*d*x+1/2*c)+1)+1/d*a/b^2*ln(tanh(1/2*d*x+1/2*c)+1)-1/d/b/(tanh(1/2*d*x+1/2*c)-1)+1/d*a/b^2*ln(
tanh(1/2*d*x+1/2*c)-1)-1/d*a^3/b^2/(a^2+b^2)*ln(tanh(1/2*d*x+1/2*c)^2*a-2*tanh(1/2*d*x+1/2*c)*b-a)-8/d/(8*a^2+
8*b^2)*a*ln(tanh(1/2*d*x+1/2*c)^2+1)-16/d/(8*a^2+8*b^2)*b*arctan(tanh(1/2*d*x+1/2*c))

________________________________________________________________________________________

Maxima [A]  time = 1.56604, size = 198, normalized size = 2.22 \begin{align*} -\frac{a^{3} \log \left (-2 \, a e^{\left (-d x - c\right )} + b e^{\left (-2 \, d x - 2 \, c\right )} - b\right )}{{\left (a^{2} b^{2} + b^{4}\right )} d} + \frac{2 \, b \arctan \left (e^{\left (-d x - c\right )}\right )}{{\left (a^{2} + b^{2}\right )} d} - \frac{a \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{{\left (a^{2} + b^{2}\right )} d} - \frac{{\left (d x + c\right )} a}{b^{2} d} + \frac{e^{\left (d x + c\right )}}{2 \, b d} - \frac{e^{\left (-d x - c\right )}}{2 \, b d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)^2*tanh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="maxima")

[Out]

-a^3*log(-2*a*e^(-d*x - c) + b*e^(-2*d*x - 2*c) - b)/((a^2*b^2 + b^4)*d) + 2*b*arctan(e^(-d*x - c))/((a^2 + b^
2)*d) - a*log(e^(-2*d*x - 2*c) + 1)/((a^2 + b^2)*d) - (d*x + c)*a/(b^2*d) + 1/2*e^(d*x + c)/(b*d) - 1/2*e^(-d*
x - c)/(b*d)

________________________________________________________________________________________

Fricas [B]  time = 2.72294, size = 733, normalized size = 8.24 \begin{align*} \frac{2 \,{\left (a^{3} + a b^{2}\right )} d x \cosh \left (d x + c\right ) - a^{2} b - b^{3} +{\left (a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{2} +{\left (a^{2} b + b^{3}\right )} \sinh \left (d x + c\right )^{2} - 4 \,{\left (b^{3} \cosh \left (d x + c\right ) + b^{3} \sinh \left (d x + c\right )\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) - 2 \,{\left (a^{3} \cosh \left (d x + c\right ) + a^{3} \sinh \left (d x + c\right )\right )} \log \left (\frac{2 \,{\left (b \sinh \left (d x + c\right ) + a\right )}}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) - 2 \,{\left (a b^{2} \cosh \left (d x + c\right ) + a b^{2} \sinh \left (d x + c\right )\right )} \log \left (\frac{2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + 2 \,{\left ({\left (a^{3} + a b^{2}\right )} d x +{\left (a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{2 \,{\left ({\left (a^{2} b^{2} + b^{4}\right )} d \cosh \left (d x + c\right ) +{\left (a^{2} b^{2} + b^{4}\right )} d \sinh \left (d x + c\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)^2*tanh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="fricas")

[Out]

1/2*(2*(a^3 + a*b^2)*d*x*cosh(d*x + c) - a^2*b - b^3 + (a^2*b + b^3)*cosh(d*x + c)^2 + (a^2*b + b^3)*sinh(d*x
+ c)^2 - 4*(b^3*cosh(d*x + c) + b^3*sinh(d*x + c))*arctan(cosh(d*x + c) + sinh(d*x + c)) - 2*(a^3*cosh(d*x + c
) + a^3*sinh(d*x + c))*log(2*(b*sinh(d*x + c) + a)/(cosh(d*x + c) - sinh(d*x + c))) - 2*(a*b^2*cosh(d*x + c) +
 a*b^2*sinh(d*x + c))*log(2*cosh(d*x + c)/(cosh(d*x + c) - sinh(d*x + c))) + 2*((a^3 + a*b^2)*d*x + (a^2*b + b
^3)*cosh(d*x + c))*sinh(d*x + c))/((a^2*b^2 + b^4)*d*cosh(d*x + c) + (a^2*b^2 + b^4)*d*sinh(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sinh ^{2}{\left (c + d x \right )} \tanh{\left (c + d x \right )}}{a + b \sinh{\left (c + d x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)**2*tanh(d*x+c)/(a+b*sinh(d*x+c)),x)

[Out]

Integral(sinh(c + d*x)**2*tanh(c + d*x)/(a + b*sinh(c + d*x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.41449, size = 169, normalized size = 1.9 \begin{align*} -\frac{\frac{2 \, a^{3} \log \left ({\left | b e^{\left (2 \, d x + 2 \, c\right )} + 2 \, a e^{\left (d x + c\right )} - b \right |}\right )}{a^{2} b^{2} + b^{4}} - \frac{2 \, a d x}{b^{2}} + \frac{4 \, b \arctan \left (e^{\left (d x + c\right )}\right )}{a^{2} + b^{2}} + \frac{2 \, a \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}{a^{2} + b^{2}} - \frac{e^{\left (d x + c\right )}}{b} + \frac{e^{\left (-d x - c\right )}}{b}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)^2*tanh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(2*a^3*log(abs(b*e^(2*d*x + 2*c) + 2*a*e^(d*x + c) - b))/(a^2*b^2 + b^4) - 2*a*d*x/b^2 + 4*b*arctan(e^(d*
x + c))/(a^2 + b^2) + 2*a*log(e^(2*d*x + 2*c) + 1)/(a^2 + b^2) - e^(d*x + c)/b + e^(-d*x - c)/b)/d